Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility rework 2 #64

Open
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

rankynbass
Copy link
Contributor

@rankynbass rankynbass commented Jul 26, 2023

Replacement compatibility rework to go with PR goatcorp/FFXIVQuickLauncher#1366.

This allows for the selecting of different wine versions, different dxvk versions, and hud options to all be managed on the XL.Core side. The values are then passed to CompatibilityTools. This primarily allows for updating wine or dxvk without touching XL.Common.Unix.

Replaces #59

Here's a flatpak of the launcher, for testing: https://github.com/rankynbass/XIVLauncher.Core/releases/tag/compatrework-v2

@rankynbass rankynbass mentioned this pull request Jul 26, 2023
@rankynbass
Copy link
Contributor Author

rankynbass commented Sep 14, 2023

Wine folders can now be dropped in compatibilitytools/wine and dxvk folders can be dropped in compatibilitytool/dxvk, and they will now appear in the drop down lists. This basically replaces an enum with a dictionary, which is a lot more flexible and requires a lot fewer switch statements. Should be easier to update when new versions of wine or dxvk are released.
xlcore-custom-wine-versions-2

@rankynbass rankynbass requested a review from a team as a code owner October 6, 2024 03:15
@rankynbass
Copy link
Contributor Author

Updated for the XL.Common.Unix merge.

Copy link
Contributor

@marzent marzent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually I find it makes more sense to have OSInfo live in XIVLauncher.Common (this also gets rid of passing around that extra Flatpak bool).

Given that XL changes are rather hard though, it might be worth to put it for now into something like XIVLauncher.Common2, which would also allow to extend the existing interface more easily in the future (including auto-launch features)

@rankynbass
Copy link
Contributor Author

Honestly, OSInfo could just be renamed DistroInfo, because that's all it's really doing. Yeah, it has checks for other OSes, but those aren't actually used for anything. It could just as easily be an IsLinux bool instead of an a platform enum. As for the flatpak bool, tbh it's not used for anything either. I mainly added it just in case, but never found any reason to use it in CompatibilityTools. All of the flatpak stuff has to be worked out before it gets passed to CompatibilityTools anyway.

@marzent
Copy link
Contributor

marzent commented Nov 7, 2024

If the Flatpak bool is truly not needed, then it should probably just be removed honestly.

But even as DistroInfo it does make much more sense to have it conceptually there (and could for example greatly simplify MangoHudIsInstalled).

In this MR as it is right now, it is used however much more like a more advanced OSVersion.

* Rename to LinuxInfo
* Add file find functions to LinuxInfo
* Add library search paths to LinuxInfo
* Change Platform object to IsLinux bool
* Changed IsFlatpak bool to Container enum (flatpak, snap, none)
* Reworked DxvkSettings.IsMangoHudInstalled()
  I didn't realize there was a way to limit recursion in GetFiles(), so I was using linux find.
  EnumerationOptions was the solution:
  * set RecurseSubdirectories = true
  * set MaxRecursionDepth
* Move library path handling to a helper function
* Move HttpClient.Dispose() below Veldrid resource cleanup
  This seems to fix the occasional memory errors on close
  These errors were only visible on the terminal, and harmless.
@rankynbass
Copy link
Contributor Author

I've moved OSInfo into XL.Common.Unix and renamed it LinuxInfo. I've also added library paths to LinuxInfo, so that there's a List of paths to search for common library files. I've adjusted the MangoHudIsInstalled function to make use of it, and plan to use it for finding DLSS libraries in the future, when that gets added.

I've also added Snap handling, since it's possible XLCore will be run inside of Snap Steam using XLM on Ubuntu distros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants